import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from "vuex-persistedstate"

Vue.use(Vuex)

const module_ops = {
    namespaced: true,
    state: {
        scene: ""
    },
    mutations: {
        setScene(state, scene) {
            state.scene = scene;
        }
    },
}


const store = new Vuex.Store({
    modules: {
        ops: module_ops,
    },
    plugins: [createPersistedState({storage: window.sessionStorage})]
})

export default store
